$(document).ready(function() {	

	let mls = $("#popular-author");
	$.ajax({
		type: "GET",
		url: "/photo/popular-author.do",
		dataType: "json",
		success: function(data) {
			console.info(data)
			mls.empty();
			$.each(data, function(i, n) {
			 console.info(i)
				 console.info(n)
					let ml1=ml.clone().appendTo(mls);
			 		
					ml1.find(".cc-user-name").text(n.userRealName).attr("data-author", n.userName).css({"font-size":"25px","text-align":"center",});
					// ml1.find(".cc-user-desc-content").text(j.):
					ml1.find(".user_img").attr("src", n.photoWatermarkPicPath);
					ml1.find(".cc-user-desc-content").text("获赞数:"+n.photoPicGreatCount).css({"float":"right",});
					ml1.find(".cc-item-top").css({"background":"url('"+n.userImg+"')","background-size":"cover","background-repeat":"no-repeat", "background-position":"center"});
				
			});
		}
	});
	
	exec();
});

let exec = function() {
	$("body").on("click","[data-click]", function() {
		sessionStorage.author = $(this).find("[data-author]").data("author");
		//sessionStorage.author
	});
}
// <div class="cc-img-bg" style="background-image:
// url(&quot;//pic3-nc.pocoimg.cn/image/poco/works/63/2019/0425/13/15561719293708662_64925705_W240.jpeg&quot;);"></div>

//<div class="cc-item-top">
//<img class="user_img" />
//</div>
//<img class="user_img" style="z-index=99"/>

//style="background:url('../img/_noimg.png') no-repeat
let ml = $(`
<div class="w_poco_index_photographer_module_item" data-click style="width:200px" >
	<a href="/photo/user_pic.html" target="_blank">
	<div class="cc-item">
		<div class="cc-item-top"  ">
			
		</div>
		
		<div class="cc-item-bottom">
			
				<div class="cc-user-name" style="font-size:10px;overflow: visible;z-index=99" ></div>
			
			<div class="cc-user-desc">
				<p class="cc-user-desc-content"></p>
			</div>
		</div>
	</div>
	</a>
</div>`);
